<!DOCTYPE html>
<html>
<head>
    <title></title>
		<#include "/header.html">
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-datetimepicker.min.css">

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
			<#if shiro.hasPermission("manage:operation:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("manage:operation:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("manage:operation:stopUsing")>
            <a class="btn btn-primary" @click="stopUsing"><i class="fa fa-trash-o"></i>&nbsp;停用</a>
			</#if>
            <#if shiro.hasPermission("manage:operation:save")>
            <a class="btn btn-primary" @click="addUser"><i class="fa fa-plus"></i>&nbsp;新增企业人员信息管理员</a>
            </#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="showUserList">
        <table id="userGrid"></table>
        <div id="userGridPager"></div>
    </div>

    <div v-show="showAddUser" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">

            <div class="container">
                <div class="form-group col-md-12">
                    <label class="col-md-2 control-label">用户名</label>
                    <div class="col-md-4">
                        <input class="form-control"  type="text" v-model="user.username" placeholder="登录账号"/>
                    </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                    <label class="col-md-2 control-label">密码</label>
                    <div class="col-md-4">
                        <input class="form-control"  type="text" v-model="user.password" placeholder="密码"/>
                    </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                    <label class="col-md-2 control-label">邮箱</label>
                    <div class="col-md-4">
                        <input class="form-control"  type="text" v-model="user.email" placeholder="邮箱"/>
                    </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                    <label class="col-md-2 control-label">手机号</label>
                    <div class="col-md-4">
                        <input class="form-control"  type="text" v-model="user.mobile" placeholder="手机号"/>
                    </div>
                </div>
            </div>


            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveUser" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>

    <div v-show="showAddOperation" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">

            <div class="container">
            <div class="form-group col-md-12">
                    <label class="col-md-2 control-label">公司名称</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" v-model="operation.corporateName" placeholder="公司名称"/>
                    </div>
                    <label class="col-md-2 control-label">经营范围</label>
                    <div class="col-md-4">
                        <input type="text" class="form-control" v-model="operation.businessScope" placeholder="经营范围"/>

                    </div>
            </div>
        </div>

            <div class="container">
                <div class="form-group col-md-12">
                        <label class="col-md-2 control-label">注册时间</label>
                        <div class="col-md-4">
                            <input type="text" id="registrationTime" class="form-control" v-model="operation.registrationTime" placeholder="注册时间" autocomplete="off"/>
                        </div>
                        <label class="col-md-2 control-label">公司代码</label>
                        <div class="col-md-4">
                            <input type="text" class="form-control" v-model="operation.companyCode" placeholder="公司代码"/>
                        </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                        <label class="col-md-2 control-label">法人</label>
                        <div class="col-md-4">
                            <input type="text" class="form-control" v-model="operation.legalPerson" placeholder="法人"/>
                        </div>
                        <label class="col-md-2 control-label">公司性质</label>
                        <div class="col-md-4">
                            <input type="text" class="form-control" v-model="operation.companyNature" placeholder="公司性质"/>
                        </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                        <label class="col-md-2 control-label">现任董事长</label>
                        <div class="col-md-4">
                            <input type="text" class="form-control" v-model="operation.currentChairman" placeholder="现任董事长"/>
                        </div>
                        <label class="col-md-2 control-label">员工数量</label>
                        <div class="col-md-4">
                            <input type="text" class="form-control" v-model="operation.numberEmployees" placeholder="员工数量"/>
                        </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                        <label class="col-md-2 control-label">现公司地址</label>
                        <div class="col-md-4">
                            <textarea class="form-control" v-model="operation.companyAddress" placeholder="现公司地址" type="text"></textarea>
                        </div>
                        <label class="col-md-2 control-label">公司所在地址</label>
                        <div class="col-md-4">
                            <textarea class="form-control" v-model="operation.locationCompany" placeholder="公司所在地址" type="text"></textarea>
                        </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
                        <label class="col-md-2 control-label">注册地址</label>
                        <div class="col-md-4">
                            <textarea class="form-control" v-model="operation.registeredAddres" placeholder="注册地址" type="text"></textarea>
                        </div>
                        <label class="col-md-2 control-label">备注</label>
                        <div class="col-md-4">
                            <textarea class="form-control" v-model="operation.remarks" placeholder="备注" type="text"></textarea>
                        </div>
                </div>
            </div>

            <div class="container">
                <div class="form-group col-md-12">
							            <div class="form-group">
                <div class="col-md-6 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
                </div>
            </div>
        </form>
    </div>
</div>

<script src="${request.contextPath}/statics/libs/bootstrap-datetimepicker.min.js"></script>
<script src="${request.contextPath}/statics/libs/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${request.contextPath}/statics/js/modules/manage/operation.js?_${.now?long}"></script>
</body>
</html>